def subsets(nums):
    result = set()
    path = []
    i = 0
    back_track(nums, result, path, i)
    return result

def back_track(nums, result, path, i):
    result.add(tuple(path))
    for j in range(i, len(nums)):
        path.append(nums[j])
        back_track(nums, result, path, j+1)
        path.pop()

print(subsets([1,2,3]))